import sys
import S3DPath
from S3D import QtHelper
from S3D.Config import Config
from S3D.Tools.Sound.BatchEditor.MainWindow import MainWindow

class SoundsBatchEditorConfig(Config):
    VERSION = 4
    PATH = "SoundsFdpBatchEditor.config"

    def __init__(self):
        self.workspace      = None
        self.projectPath    = ""
        self.property       = 0
        self.value          = ""
        self.action         = 0
        self.eventsListPath = ""
        self.useEventsList  = False

def main():
    QtHelper.ensureSingleApp("SoundsFdpBatchEditor")

    config = SoundsBatchEditorConfig.load()
    wnd = MainWindow(config)
    res = QtHelper.qApp.exec_()
    config.save()
    sys.exit(res)

if __name__ == "__main__":
    main()
